package com.mvu.banana.guest.server;

import com.mvu.banana.common.client.PermissionDTO;
import com.mvu.banana.common.server.PermissionChecker;
import com.mvu.banana.common.server.ServletFactory;
import com.mvu.banana.domain.server.EMF;
import com.mvu.banana.guest.client.gen.LoginPanelDTO;
import com.mvu.banana.guest.client.gen.SignUpFormDTO;
import com.mvu.banana.guest.client.gen.UserTileDTO;
import com.mvu.banana.internal.generated.RunBoxDTO;
import com.mvu.banana.internal.server.RunBoxServlet;
import com.mvu.banana.user.generated.SearchProfileDTO;
import com.mvu.banana.user.server.SearchProfileServlet;

import javax.servlet.http.HttpServlet;

/**
 */
public class SetupServlet extends HttpServlet{
  public void init(){
    EMF.get();
    ServletFactory.register(SearchProfileDTO.class, new SearchProfileServlet());
    ServletFactory.register(LoginPanelDTO.class, new LoginPanelServlet());
    ServletFactory.register(PermissionDTO.class, PermissionChecker.get());
    ServletFactory.register(UserTileDTO.class, new UserTileServlet());
    ServletFactory.register(SignUpFormDTO.class, new SignUpFormServlet());
    ServletFactory.register(RunBoxDTO.class, new RunBoxServlet());
  }
}
